//
// Created by jaesonzhang on 2024/9/13.
//

#ifndef SKIACANVASJSBINDING_CONTEXT_H
#define SKIACANVASJSBINDING_CONTEXT_H

#include <jni.h>
#include <android/log.h>
#include "core/SkTypeface.h"
#include "core/SkFont.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkBitmap.h"

namespace skiacanvas {
class Context: public std::enable_shared_from_this<Context> {
 public:
  Context(uint32_t width, uint32_t height);
  void fillText(const char *str, uint32_t x, uint32_t y);
  void fillRect(uint32_t startX, uint32_t startY, uint32_t endX, uint32_t endY);

 public:
  SkBitmap skBitmap;

 private:
  uint32_t width;
  uint32_t height;
  SkCanvas skCanvas;
  SkPaint paint;
  SkPaint textPaint;
};
} // end of namespace skiacanvas


#endif //SKIACANVASJSBINDING_CONTEXT_H
